package com.eims.sls_app.ui;

import java.util.ArrayList;
import java.util.List;

import com.eims.sls_app.ui.adapter.AvatarLvAdapter;
import com.eims.sls_app.view.MyToast;

import bls.juejin.cn.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

public class AvatarActivity extends MyBaseActivity {
	
	private ImageView iv_back;
	private TextView tv_finish;
	private ListView lv_avater;
	private List icon; 
	private String[] titles ={"女生"};
	private AvatarLvAdapter adapter;
	private int[] timg1 = {R.drawable.timg1_0,R.drawable.timg1_1,R.drawable.timg1_2,R.drawable.timg1_3,R.drawable.timg1_4,R.drawable.timg1_5,R.drawable.timg1_6,R.drawable.timg1_7};
	private int[] timg2 = {R.drawable.timg2_0,R.drawable.timg2_1,R.drawable.timg2_2,R.drawable.timg2_3,R.drawable.timg2_4,R.drawable.timg2_5,R.drawable.timg2_6,R.drawable.timg2_7};
	private int[] timg3 = {R.drawable.girl1,R.drawable.girl2,R.drawable.girl3,R.drawable.girl4,R.drawable.girl5,R.drawable.girl6,R.drawable.girl7,R.drawable.girl8};
	private int[] timg4 = {R.drawable.timg4_0,R.drawable.timg4_1,R.drawable.timg4_2,R.drawable.timg4_3,R.drawable.timg4_4,R.drawable.timg4_5,R.drawable.timg4_6,R.drawable.timg4_7};
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_avatar);
		//setContentView(R.layout.adapter_circle_item);
		//setContentView(R.layout.activity_documentary);
		initView();
	}

	private void initView() {
		iv_back = (ImageView) findViewById(R.id.btn_back);
		tv_finish = (TextView) findViewById(R.id.tv_finish);
		lv_avater = (ListView) findViewById(R.id.listView_avater);
		icon = new ArrayList();
		//icon.add(timg1);
		//icon.add(timg2);
		icon.add(timg3);
		//icon.add(timg4);
		adapter = new AvatarLvAdapter(titles,icon,AvatarActivity.this);
		lv_avater.setAdapter(adapter);
		lv_avater.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> arg0, View arg1, int arg2,
					long arg3) {
				//MyToast.getToast(AvatarActivity.this, "arg2="+arg2).show();
				
			}
		});
	}

}
